﻿using AnimationPage.Views;
using CommunityToolkit.Mvvm.Input;

namespace AnimationPage.ViewModels;

public partial class MainWindowViewModel : ViewModelBase
{
    public MainWindowViewModel()
    {
        CurrentPage = new LoginPage()
        {
            DataContext = new LoginPageViewModel()
        };
        // CurrentPage = new ChatPage()
        // {
        //     DataContext = new ChatPageViewModel()
        // };
    }

    [RelayCommand]
    private void GoRegister()
    {
        CurrentPage = new RegisterPage
        {
            DataContext = new RegisterPageViewModel()
        };

        Page = CurrentPage;
    }

    [RelayCommand]
    private void GoHome()
    {
        CurrentPage = new LoginPage()
        {
            DataContext = new LoginPageViewModel()
        };

        Page = CurrentPage;
    }

    [RelayCommand]
    private void OnClosed()
    {
    }
}